$(document).ready(function (){
	
	view_init();
	
	event_init();
	
});

var url_param_userAccount = getQueryString("id");

// 健康档案分页对象
var pageObj_health = {};

// 用户行为记录分页对象
var pageObj_behaviour = {};

function view_init()
{
	var obj = new Object();
	obj.userAccount = url_param_userAccount;
	um_ajax_post(
			INDEX_WEBAPP + "/appuser/detail.do",
			obj,
			function (data){
				render_info_div(data.user);
			},
			null);
	
}

function event_init()
{
	$("[class=icon-minus]").click(function (){
		var divId = $(this).attr("data-id");
		
		$("#" + divId).toggle();
	});
	
}




function render_info_div(data)
{
	$("#info_body").umDataBind("render" , data ,"");
	var path="http://112.124.19.171/audio/icon/"
	var imgUrl = "/carfee/image/default.jpg";
	if (data.icon)
	{
		imgUrl =path+data.icon;
	}
	$("#appuser_detail_img").attr("src" ,imgUrl)
}


